package com.osgix.authorize.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.osgix.authorize.model.PrivilegeResource;
import com.osgix.authorize.dao.PrivilegeResourceDao;
import com.osgix.authorize.service.PrivilegeResourceManager;
import com.osgix.common.orm.Page;
import com.osgix.common.orm.ibatis.EntityDao;
import com.osgix.common.service.BaseManager;
import com.osgix.common.service.AbsBaseManager;
import com.osgix.authorize.service.PrivilegeResourceManager;

import com.osgix.common.orm.ibatis.BaseIbatisDao;
import org.springframework.stereotype.Repository;

@Service("privilegeResourceManager")
@Transactional
public class PrivilegeResourceManagerImpl extends AbsBaseManager<PrivilegeResource,Long> implements PrivilegeResourceManager{

	private PrivilegeResourceDao privilegeResourceDao;
	
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	@Resource
	public void setPrivilegeResourceDao(PrivilegeResourceDao dao) {
		this.privilegeResourceDao = dao;
	}
	
	public EntityDao getEntityDao() {
		return this.privilegeResourceDao;
	}
	
	public void savePrivilegeResource(PrivilegeResource privilegeResource) {
		privilegeResourceDao.save(privilegeResource);
	}
	
	public void updatePrivilegeResource(PrivilegeResource privilegeResource) {
		privilegeResourceDao.update(privilegeResource);
	}
	
	
}
